<template>
  <div>
    <div :class="[{ header: isActive }, 'NoBackground']">
      <div class="contentBox">
        <div class="arrowleft" @click="back()">
          <div class="iconleft">
            <van-icon name="arrow-left" size="30" color="#CDCDCD" />
            <div v-if="hot">{{ hot }}</div>
          </div>
        </div>
        <div v-if="data" class="dataTile">{{ data.date || data }}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["data", "isActive", "hot"],
  data() {
    return {
      // data:this.data
    };
  },
  methods: {
    back() {
      this.$router.back();
      
    },
  },
};
</script>

<style lang="less" scoped>
.header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 50px;
  text-align: center;
  line-height: 50px;
  background-color: #ffffff;
  z-index: 1;
  color: black;
  font-size: 14px;
}
.NoBackground {
  position: fixed;
  top: 0;
  width: 100%;
  height: 50px;
  text-align: center;
  line-height: 30px;
  z-index: 1;
  color: black;
  font-size: 14px;
}

.contentBox {
  position: relative;
  .arrowleft {
    position: absolute;
    left: 5px;
    .iconleft {
      display: flex;
      align-items: center;
      margin-top: 10px;
      font-size: 16px;
      color: #000;
    }
  }
  .dataTile {
    padding-top: 10px;
    color: #000;
    font-size: 16px;
  }
}
</style>